package com.atguigu.yygh.oss.prop;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "aliyun.oss.file")
//此注解不支持yml文件,不能跟主启动类中的 @EnableConfigurationProperties(OssProperties.class) 搭配使用
@PropertySource(value = {"classpath:oss.properties"})
@Data
@ToString
@Component
public class OssProperties {

    private String endpoint;
    private String keyid;
    private String keysecret;
    private String bucketname;
}
